package demo3;
interface A {
    public void func ();
}
class B {
    public void funa () {
        System.out.println("asdf");
    }
}
abstract class C {
    public void abc () {
        System.out.println("mmm");
    }
}
abstract class D {
    abstract void fgh();
}
public class Test {
    public static void main(String[] args) {
        new A(){
            @Override
            public void func() {
                System.out.println("匿名内部类!!!");
            }
        }.func();
        new B(){
            @Override
            public void funa() {
                System.out.println("vbjgfhjfdg");
            }
        }.funa();
        new C() {
            @Override
            public void abc() {
                System.out.println("qwewet");
            }
        }.abc();
        new D () {
            @Override
             void fgh() {
                System.out.println("ppppppp");
            }
        };
    }
}
